export function reverse( value ) {
  return value.split( "" ).reverse().join( "" );
}

export function camel( str ) {
  return str.replace( /(?:^\w|[A-Z]|\b\w|\s+)/g, ( match, index ) => {
    if ( +match === 0 ) return ""; // or if (/\s+/.test(match)) for white spaces
    return index === 0 ? match.toLowerCase() : match.toUpperCase();
  } );
}

export function camelToKebab( value ) {
  return value.replace( /([a-z])([A-Z])/g, "$1-$2" ).toLowerCase();
}



/*
- count(substring)
Returns the count of the number of occurrences of the substring.
*/
